package 数据结构;

import org.w3c.dom.ls.LSOutput;

import java.util.Scanner;

/**
 * @author 乐心湖
 * @date 2020/6/15 18:13
 **/
public class Main2 {

    public static void main(String[] args) {
        String str1 ="helloword";

        StringBuffer stringBuffer = new StringBuffer(str1);
        System.out.println(stringBuffer);//helloword

        StringBuilder stringBuilder = new StringBuilder(str1);
        System.out.println(stringBuilder);//helloword

        stringBuffer.append(" is StringBuffer");
        System.out.println(stringBuffer);//helloword is StringBuffer

        stringBuilder.append(" is StringBuider");
        System.out.println(stringBuilder);//helloword is StringBuider
    }
}
